negotiator.boaframework
Class OpponentModel

java.lang.Object
  extended by negotiator.boaframework.OpponentModel
Direct Known Subclasses:
AgentLGModel, AgentXFrequencyModel, BayesianModel, CUHKFrequencyModelV2, CycleModel, DefaultModel, FSEGABayesianModel, HardHeadedFrequencyModel, IAMhagglerBayesianModel, NashFrequencyModel, NoModel, OppositeModel, ParallelOM, PerfectIAMhagglerBayesianModel, PerfectModel, PerfectScalableBayesianModel, ScalableBayesianModel, SmithFrequencyModel, SmithFrequencyModelV2

public abstract class OpponentModel
extends java.lang.Object

Describes an opponent model of an agent of the BOA framework. Tim Baarslag, Koen Hindriks, Mark Hendrikx, Alex Dirkzwager and Catholijn M. Jonker. Decoupling Negotiating Agents to Explore the Space of Negotiation Strategies

Author:
Alex Dirkzwager, Mark Hendrikx

Field Summary
protected  NegotiationSession negotiationSession
          Reference to the negotiation state
protected  UtilitySpace opponentUtilitySpace
          Reference to the estimated opponent's utility state
 
Constructor Summary
OpponentModel()
           
 
Method Summary
 void cleanUp()
          Removes references to the objects used by the opponent model.
 void endSession(NegotiationResult result)
          Method called at the end of the negotiation.
 double getBidEvaluation(Bid bid)
          Determines the utility of a bid according to the preference profile.
 double[] getIssueWeights()
           
 java.lang.String getName()
           
 UtilitySpace getOpponentUtilitySpace()
           
 double getWeight(Issue issue)
          Returns the weight of a particular issue in the domain.
 void init(NegotiationSession negotiationSession)
          Alternative init method to initialize the model without setting parameters.
 void init(NegotiationSession negotiationSession, java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          Initializes the model.
 boolean isCleared()
           
 java.io.Serializable loadData()
          Method used to load the saved object, possibly created in a previous negotiation session.
 void setOpponentUtilitySpace(BilateralAtomicNegotiationSession fNegotiation)
          Method which may be overwritten by an opponent model to get access to the opponent's utilityspace.
 void setOpponentUtilitySpace(UtilitySpace opponentUtilitySpace)
          Method which may be overwritten by an opponent model to get access to the opponent's utilityspace.
 void storeData(java.io.Serializable object)
          Method used to store data that should be accessible in the next negotiation session on the same scenario.
 void updateModel(Bid opponentBid)
          Method used to update the opponent model.
abstract  void updateModel(Bid bid, double time)
          Method used to update the opponent model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

negotiationSession

protected NegotiationSession negotiationSession
Reference to the negotiation state


opponentUtilitySpace

protected UtilitySpace opponentUtilitySpace
Reference to the estimated opponent's utility state

Constructor Detail

OpponentModel

public OpponentModel()
Method Detail

init

public void init(NegotiationSession negotiationSession,
                 java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          throws java.lang.Exception
Initializes the model. The init method should always be called after creating an opponent model.

Parameters:
negotiationSession - reference to the state of the negotiation
parameters -
Throws:
java.lang.Exception

init

public void init(NegotiationSession negotiationSession)
Alternative init method to initialize the model without setting parameters.

Parameters:
negotiationSession - reference to the state of the negotiation

updateModel

public void updateModel(Bid opponentBid)
Method used to update the opponent model.

Parameters:
opponentBid -

updateModel

public abstract void updateModel(Bid bid,
                                 double time)
Method used to update the opponent model.

Parameters:
bid - to update the model with.
time - at which the bid was offered.

getBidEvaluation

public double getBidEvaluation(Bid bid)
Determines the utility of a bid according to the preference profile.

Parameters:
bid - of which the utility is calculated.
Returns:
Utility of the bid

getOpponentUtilitySpace

public UtilitySpace getOpponentUtilitySpace()
Returns:
the estimated utility space of the opponent

setOpponentUtilitySpace

public void setOpponentUtilitySpace(BilateralAtomicNegotiationSession fNegotiation)
Method which may be overwritten by an opponent model to get access to the opponent's utilityspace.

Parameters:
fNegotiation -

setOpponentUtilitySpace

public void setOpponentUtilitySpace(UtilitySpace opponentUtilitySpace)
Method which may be overwritten by an opponent model to get access to the opponent's utilityspace.

Parameters:
opponentUtilitySpace -

getWeight

public double getWeight(Issue issue)
Returns the weight of a particular issue in the domain.

Parameters:
issue - from which the weight should be returned
Returns:
weight of the given issue

getIssueWeights

public double[] getIssueWeights()
Returns:
set of all estimated issue weights.

cleanUp

public void cleanUp()
Removes references to the objects used by the opponent model.


isCleared

public boolean isCleared()
Returns:
if the opponent model is in a usable state.

getName

public java.lang.String getName()
Returns:
name of the opponent model.

storeData

public final void storeData(java.io.Serializable object)
Method used to store data that should be accessible in the next negotiation session on the same scenario. This method can be called during the negotiation, but it makes more sense to call it in the endSession method.

Parameters:
object - to be saved by this component.

loadData

public final java.io.Serializable loadData()
Method used to load the saved object, possibly created in a previous negotiation session. The method returns null when such an object does not exist yet.

Returns:
saved object or null when not available.

endSession

public void endSession(NegotiationResult result)
Method called at the end of the negotiation. Ideal location to call the storeData method to update the data to be saved.

Parameters:
result - of the negotiation.